home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1989 February / Ahoy_Magazine_89-02_1989_Double_L.d64 / Time Angle (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  495b  |  15 lines

  1. 0 print"[147]"tab(14)"time angle"
  2. 1 rem ==================================
  3. 2 rem    commodares problem #58-2 :
  4. 3 rem       time angle
  5. 4 rem    solution by
  6. 5 rem       jim borden
  7. 6 rem ==================================
  8. 10 poke 208,1: poke 842,34: input "hh:mm:ss";t$: if len(t$)<>8 goto 10
  9. 20 rem  198    &    631     for c-64 users
  10. 30 h=val(left$(t$,2)): m=val(mid$(t$,4,2)): s=val(right$(t$,2))
  11. 40 if h>11 then h=h-12: if h>11 then h=h-12
  12. 50 m=m*6+s*.1: h=(h+m/360)*30: a=abs(h-m): if a>180 then a=360-a
  13. 60 print "angle ="; a; "degrees"
  14. 70 goto 10
  15.